<!doctype html>
<html>
    <head>
        <meta charset="utf-8">
        <title>无标题文档</title>
        <link rel="stylesheet" type="text/css" href="__CSS__/pintuer.css" />
        <link rel="stylesheet" type="text/css" href="__CSS__/store/common.css" />
        <script type="text/javascript" src="__JQ__"></script>
        <script type="text/javascript" src="__JS__/taodudu.lib.js"></script>
        <script type="text/javascript" src="__JS__/layer/layer.js"></script>
        <style type="text/css">
            .admin{padding: 10px;}
            .input-inline{padding: 10px;}
            .label{ width: 12%;}
            .field {width: 66%; float: left;}
            .button{width: 18%; margin-left: 2%;}

            .focus-trigeminy-group{background-color: #FFF;display: block;padding-left: 9px;margin: 16px 1px 1px 1px;border-style: dashed;border-width: 1px;border-color: #DDD;position: relative;box-shadow: 3px 3px 0 rgba(204,204,204,0.1);}
            .focus-trigeminy-group{margin: 9px;}
            h5{font-size: 13px;color: #0099CC;}
            .focus-trigeminy-group ul{font-size: 0;overflow: hidden;}
            .focus-trigeminy-group ul >li:nth-child(3n){margin-right: 0px;}
            .focus-trigeminy-group ul li{background-color: #F5F5F5;display: inline-block;width: 204px;padding: 4px;margin-right:10px;border: dashed 1px #DDD;cursor: pointer; margin-bottom: 9px;}
            .full-screen-slides ul li .del, .focus-trigeminy-group .del, .sale-layout dl .del{font: 10px/14px Tahoma;color: #19AEDE;text-align: center;background-color: #FFF;display: none;width: 14px;height: 14px;border: solid 1px #19AEDE;border-radius: 8px;position: absolute;z-index: 1;top: -6px;right: -6px;cursor: pointer;}
            .focus-trigeminy-group ul li .focus-thumb{line-height: 0;text-align: center;vertical-align: middle;display: table-cell;width: 173px;height: 120px;overflow: hidden;cursor: pointer;}
            .focus-trigeminy-group ul li img{max-width: 173px;max-height: 120px;}
            #SearchGoods{position: fixed;top: 25%;width: 620px;left: 50%;margin-left: -325px;border:5px solid rgba(148, 148, 148, 0.45);border-radius: 5px;max-height: 440px;overflow: auto;}
            .focus-trigeminy-group ul{padding-top: 10px; padding-left: 0px;}
            .focus-trigeminy-group ul li{position: relative;overflow: initial;}
            .focus-trigeminy-group ul li p{width: 100%;margin: 0;left: 0;font-size: 14px;position: absolute;bottom: 0;background: rgba(0, 0, 0, 0.5);color: #fff;line-height: 24px;height: 24px;overflow: hidden;}
            .focus-trigeminy-group{padding-top: 0;}

            .focus-trigeminy-group ul li:hover {border: 1px dashed #C00;}
            .del_he{font-size: 14px;color: #19AEDE;text-align: center;background-color: #FFF;width: 20px;height: 20px;border: solid 1px rgba(148, 148, 148, 0.45);position: absolute;z-index: 1;top: 3px;right: 3px;cursor: pointer;}
            .input_small{width: 125px;}
            
            /******** @name 分页样式****/                    
            .pages{ clear:both;padding:0; overflow: hidden;margin: 0 9px 9px 6px;}
            .pages a,.pages span{color:#777;border-radius: 4px;float: left;padding: 6px 12px;margin-left:2px;line-height: 1.42857143;text-decoration: none;background-color: #fff;border: 1px solid #ddd;}
            .pages .current{background: #fd6600;color: #ffffff;border-color: #ff6600;}
        </style>
    </head>
    <body>


        <div class="admin">
            <div class="tab panel dux-box admin-panel">
                <div class="panel-head"><strong>商品搜索</strong></div>
                <div class="fixed-empty"></div>
                <form method="post" action="" name="formSearch" id="formSearch">
                    <div class="input-inline clearfix clearfix_zidingyi">
                        <div class="label">
                            <label>商品名称：</label>
                        </div>
                        <div class="field">
                            <input class="input" type="text" name="keys" value="">
                        </div>
                        <input type="hidden" name="tp" value="{$tp}">
                        <button class="button bg-blue" type="submit">查询</button>
                    </div>
                </form>
                <notempty name="arr">
                <div class="focus-trigeminy-group delete_goods">
                    <ul class="ui-sortable">
                        <if condition="$tp eq vrGoods">
                        <foreach item="v" name="arr">
                        <li class="transmit" id="{$v['vr_id']}">
                            <div class="focus-thumb"><img title="{$v['vr_title']}" src="{$v['vr_thumb']}"></div>
                            <p>{$v['vr_title']}</p>
                        </li>
                        </foreach>
                        <else />
                        <foreach item="v" name="arr">
                        <li class="transmit" id="{$v['goods_id']}">
                            <div class="focus-thumb"><img title="{$v['goods_title']}" src="{$v['goods_thumb']}"></div>
                            <p>{$v['goods_title']}</p>
                        </li>
                        </foreach>
                        </if>
                    </ul>
                </div>
                <div class="pages clearfix">{$pages}</div>
                </notempty>
            </div>
        </div>
        <script type="text/javascript">
            var index = parent.layer.getFrameIndex(window.name);
            //给父页面传值
            $('.transmit').on('click', function(){
                var id = $(this).attr("id");
                var img = $(this).find('img').attr("src");
                var text = $(this).find('p').text();
                var html = "<input type='hidden' name='goods_id' value='"+id+"'><input type='hidden' name='goods_thumb' value='"+img+"'><img src='"+img+"' height='50' width='50' />"+text;
                parent.$('#goods').html(html);
                parent.$('#goods_title').val(text);
                //parent.layer.tips('Look here', '#addgoods', {time: 5000});
                parent.layer.close(index);
            });
        </script>
    </body>
</html>
